package ex.com.jm.food.service.impl;

import java.util.List;



import ex.com.jm.food.dao.CompanyOrderDao;
import ex.com.jm.food.entity.Order;
import ex.com.jm.food.service.CompanyOrderService;
/**
 * 订单管理业务层接口实现
 * @author wangshenfeng
 *
 */
public class CompanyOrderServiceImpl implements CompanyOrderService {

	private CompanyOrderDao companyOrderDao;
	
	public CompanyOrderDao getCompanyOrderDao() {
		return companyOrderDao;
	}

	public void setCompanyOrderDao(CompanyOrderDao companyOrderDao) {
		this.companyOrderDao = companyOrderDao;
	}

	@Override
	public List<Order> getOrders(int initPage, int pageRow, String comId,
			String userName, Integer payType, Integer payStatus,
			Integer orderFlage, String s_date, String e_date, String order,
			String sort) {
		// TODO Auto-generated method stub
		return this.getCompanyOrderDao().getOrders(initPage, pageRow, comId, userName, payType, payStatus, orderFlage, s_date, e_date, order, sort);
	}

	@Override
	public int orderCount(String comId, String userName, Integer payType,
			Integer payStatus, Integer orderFlage, String s_date, String e_date) {
		// TODO Auto-generated method stub
		return this.getCompanyOrderDao().orderCount(comId, userName, payType, payStatus, orderFlage, s_date, e_date);
	}

	@Override
	public boolean updateFlag(String orderId, Integer orderFlage) {
		// TODO Auto-generated method stub
		return this.getCompanyOrderDao().updateFlag(orderId, orderFlage);
	}

	@Override
	public boolean updateOrderStartDate(String orderId, String date) {
		// TODO Auto-generated method stub
		return this.getCompanyOrderDao().updateOrderStartDate(orderId, date);
	}

	@Override
	public boolean updateOrderEndDate(String orderId, String date) {
		// TODO Auto-generated method stub
		return this.getCompanyOrderDao().updateOrderEndDate(orderId, date);
	}

	@Override
	public void updateOrder(Order order) {
		// TODO Auto-generated method stub
		this.getCompanyOrderDao().updateOrder(order);
	}

	@Override
	public Order editOrder(String orderId) {
		// TODO Auto-generated method stub
		return this.getCompanyOrderDao().editOrder(orderId);
	}

	@Override
	public void delOrder(String orderId) {
		// TODO Auto-generated method stub
		this.getCompanyOrderDao().delOrder(orderId);
	}

	@Override
	public boolean updateAtten(String attId, String orderId) {
		// TODO Auto-generated method stub
		return this.getCompanyOrderDao().updateAtten(attId, orderId);
	}

}
